<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery.min.js"></script>
    <style></style>
</head>
<body>
    <input type="text" id="cityname" placeholder="请输入城市查询天气"/>
    <button onclick="sousuo()">搜索</button>
</body>
<script>
    function sousuo(){
        var cs=$("#cityname").val();
        var url="http://wthrcdn.etouch.cn/weather_mini?city="+cs;
        $.ajax({
            url:url,
            type:"get",
            success:function(data){
                console.log(data);
            }
        })
    }
</script>
</html>